<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/operation/Operation.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/demo/operation/Operation.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'Operationid',
            footer: "Foots",
            cnName: '操作员',
            name: 'operation/Operation',
            url: "/basicinformation/api/Operation/",
            sortName: "CreateTime"
        });
        const editFormFields = ref({ "Operationnumber": "", "CompanyName": "", "OperationName": "", "RoleName": "", "OperationPwd": "", "OperationPwd2": "" });
        const editFormOptions = ref([[{ "title": "操作员编号", "required": true, "field": "Operationnumber" }],
        [{ "title": "公司名称", "required": true, "field": "CompanyName" }],
        [{ "dataKey": "用户下拉框", "data": [], "title": "操作人姓名", "required": true, "field": "OperationName", "type": "select" }],
        [{ "dataKey": "角色下拉框", "data": [], "title": "角色名称", "required": true, "field": "RoleName", "type": "select" }],
        [{ "title": "密码", "required": true, "field": "OperationPwd" }],
        [{ "title": "确认密码", "required": true, "field": "OperationPwd2" }]]);
        const searchFormFields = ref({ "Operationnumber": "", "OperationName": "", "OperationPhone": "" });
        const searchFormOptions = ref([[{ "title": "操作员编号", "field": "Operationnumber", "type": "text" }, { "dataKey": "用户下拉框", "data": [], "title": "操作人姓名", "field": "OperationName", "type": "select" }, { "title": "操作人手机号", "field": "OperationPhone", "type": "text" }]]);
        const columns = ref([{ field: 'Operationid', title: '主键ID', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'Operationnumber', title: '操作员编号', type: 'string', width: 220, require: true, align: 'left', sort: true },
        { field: 'CompanyName', title: '公司名称', type: 'string', width: 220, require: true, align: 'left' },
        { field: 'OperationName', title: '操作人姓名', type: 'int', bind: { key: '用户下拉框', data: [] }, width: 110, require: true, align: 'left' },
        { field: 'OperationPhone', title: '操作人手机号', type: 'string', width: 220, require: true, align: 'left' },
        { field: 'OperationState', title: '操作人状态', type: 'int', width: 110, require: true, align: 'left' },
        { field: 'OperationPwd', title: '密码', type: 'string', width: 220, hidden: true, require: true, align: 'left' },
        { field: 'OperationPwd2', title: '确认密码', type: 'string', width: 220, hidden: true, require: true, align: 'left' },
        { field: 'RoleName', title: '角色名称', type: 'int', bind: { key: '角色下拉框', data: [] }, width: 220, require: true, align: 'left' },
        { field: 'CreateName', title: '创建人', type: 'string', width: 220, hidden: true, align: 'left' },
        { field: 'CreateTime', title: '创建时间', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
        { field: 'UpdateName', title: '修改人', type: 'string', width: 220, hidden: true, align: 'left' },
        { field: 'UpdateTime', title: '修改时间', type: 'datetime', width: 150, hidden: true, align: 'left', sort: true },
        { field: 'IsDel', title: '逻辑删除', type: 'int', width: 110, hidden: true, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
